/*============================================================================*/
/*                   CONTINENTAL AUTOMOTIVE SYSTEMS                           */
/*============================================================================*/
/*                        OBJECT SPECIFICATION                                */
/*============================================================================*
* name:            APP_WindowLifter.c
* version:         1.0
* created_by:      Eunice A Ibarra Galaviz
* date_created:    June 22 2011
*=============================================================================*/
/* DESCRIPTION : Header file for Application layer for WINDOW LIFTER          */
/*============================================================================*/
/* FUNCTION COMMENT : Describes the functions for Application Layer for       */
/* WINDOW LIFTER                                                              */
/* Include the state machine for WINDOW LIFTER                                */
/*============================================================================*/
/*                               OBJECT HISTORY                               */
/*============================================================================*/
/*  REVISION |   DATE      |                               |      AUTHOR      */
/*----------------------------------------------------------------------------*/
/*  1.0      | 22/jun/2011 |                               | Eunice Ibarra    */
/* Initial version for the Ale Window Lifter using Freescale Bolero micro.    */                                                              
/*============================================================================*/

#ifndef APP_WINDOWLIFTER_H                          /* To avoid double inclusion */
#define APP_WINDOWLIFTER_H

/* Register definitions for selected microcontroller */
#include "MCU_derivative.h"


#define AUTO_ONETOUCH     1u
#define NO_AUTO           0u


typedef enum
{
	re_STILL,
	re_CLOSE,
	re_CLOSE_AUTO,
	re_OPEN,
	re_OPEN_AUTO,
	re_BLOCKED	
}E_SM_WINDOWLIFTER;	/* States for WINDOW LIFTER State Machine */


/* Functions */
void APP_WindowLifter_Init(void);

void APP_WindowLifter_Sm(E_SM_WINDOWLIFTER le_State);

/* Determines next state */
void APP_WindowLifter_SmNextState(PTR_UBYTE lpub_SmNextState);

/* Moves of the windows */
void APP_WindowLifter_Still(void);
void APP_WindowLifter_Close(void);
void APP_WindowLifter_Open(void);
void APP_WindowLifter_Antipinch(void);
void APP_WindowLifter_Block(void);


#endif